class PrintProductField < ActiveRecord::Base
  belongs_to :product, :class_name => 'PrintProduct', :foreign_key => 'product_id'
  has_many :values, :class_name => 'PrintProductFieldExt', :foreign_key => 'print_product_field_ext_id'
  
  validates_presence_of :name, :message => "必须填写字段中文名称"
  validates_presence_of :field_name, :message => "必须填写字段的表单名称"
  validates_presence_of :column_type, :message => "必须填写字段的表单类型"
end
